<?php

/* @var $factory \Illuminate\Database\Eloquent\Factory */

use App\Models\Post;
use Faker\Generator as Faker;

$factory->define(Post::class, function (Faker $faker) {
    $date_time = $faker->date . ' ' .  $faker->time;

    return [
        'content' => $faker->paragraph,
        'content_format' => $faker->biasedNumberBetween(1, 2),
        'author_id' => $faker->biasedNumberBetween(1, 50),
        'leavel' => $faker->biasedNumberBetween(1, 7),
        'post_password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',
        'type_id' => $faker->biasedNumberBetween(1, 6),
        'upload_path' => '',
        'upload_name' => '',
        'like_num' => $faker->biasedNumberBetween(1, 50),
        'favorite_num' => $faker->biasedNumberBetween(1, 50),
        'view_num' => $faker->biasedNumberBetween(1, 50),
        'share_num' => $faker->biasedNumberBetween(1, 50),
        'created_at' => $date_time,
        'updated_at' => $date_time,
    ];
});
